<template>
  <div>
    <div class="cartBox" v-if="true">
      <PayTop :colorNum=1 />
      <div class="shopCartTop bodycontent">
        <i class="iconfont icon-qicheqianlian-1-copy1"></i><span>购物车</span>
      </div>
      <div class="shopCartListBox">
        <ShopCartList />
      </div>
      <div class="shopCartBottom clear bodycontent">
        <strong class="chooseAll">全选</strong>
        <strong class="deleteStrong">删除</strong>
        <input type="button" value="立即购买">
        <em>￥569</em><span>商品金额</span>
      </div>
    </div>
    <div class="cartVoid" v-else>
      <div class="cartVoidImg">
        <img src="../assets/img/shopCar.jpg" alt="">
      </div>
      <div class="carVoidBtn">
        <p>您的购物车是空的</p>
        <input type="button" value="去首页看看" class="orangeBg" @click="goToHome">
      </div>
    </div>
  </div>
</template>
<script>
import PayTop from "@/components/PayTop.vue"
import ShopCartList from "@/components/ShopCartList.vue"
export default {
  components:{
    PayTop,
    ShopCartList,
  },
  methods:{
    goToHome(){
      this.$router.push({
        path:"/index/home",
      })
    }
  },
}
</script>
<style>
  @import url(http://at.alicdn.com/t/font_1435659_n09y7wphwmq.css);
  .shopCartTop,.shopCartTop .iconfont{
    height: 50px;
    margin-top: 37px;
    font-size: 23px;
    line-height: 50px;
    margin-bottom: 10px;
  }
  .shopCartTop .iconfont{
    color: #f08200;
  }
  .shopCartTop span{
    margin-left: 20px;
    font-weight: 400;
    color: #666;
  }
  .shopCartListBox{
    margin-bottom: 10px;
  }
  .shopCartBottom{
    box-sizing: border-box;
    padding-left: 20px;
    height: 130px;
    line-height: 130px;
  }
  .shopCartBottom strong{
    color: #498e3d;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-right: 40px;
  }
  .shopCartBottom span{
    float: right;
    font-size: 18px;
    margin-right: 23px;
    color: #666;
  }
  .shopCartBottom em{
    float: right;
    color: #ff5757;
    margin-inline-start: 30px;
  }
  .shopCartBottom input{
    width: 150px;
    height: 50px;
    font-size: 20px;
    color: #fff;
    background-color: #f08200;
    border-radius:5px;
    border: none;
    float: right;
    margin-top: 40px;
    margin-left: 40px;
  }
  .cartVoid{
    display: flex;
    justify-content:center;
    height: 490px;
    box-sizing: border-box;
    padding-top: 174px;
  }
  .cartVoid .cartVoidImg{
    width: 121px;
    height: 110px;
    margin-right: 20px;
  }
  .cartVoid .cartVoidImg img{
    width: 100%;
    height: 100%;
  }
  .cartVoid input{
    width: 170px;
    height: 50px;
    color: #fff;
    border-radius: 5px;
    border: none;
    font-size: 20px;
  }
  .cartVoid p{
    font-size: 20px;
    height: 60px;
    line-height: 60px;
    color: rgb(56, 55, 55);
  }
</style>